﻿CREATE PROCEDURE [ServiceEngine].[ListSchemaObjectReferences]
@SchemaObjectID UNIQUEIDENTIFIER
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	SELECT 
		SO.SchemaObjectName ParentName,
		SO.SchemaObjectID ParentID 
	FROM 
		ServiceEngine.SchemaObjectDependencies SOD 
		JOIN ServiceEngine.SchemaObjects SO	ON SOD.ParentObjectID = SO.SchemaObjectID 
	where 
		SOD.SchemaObjectID = @SchemaObjectID
END

